<?php

/***  DOCUMENTATION LAYER

Ceo Sample Unit Test

Last Update: Aug 2007
  
DESCRIPTION
  unit test of CeoCaptcha class
  
NOTES
  $test_root dynamically sets root in order to keep tests working after
  they are moved to the __REPOSITORY directory
    
______________________________________________________________________________*/

$_tx0 = microtime();
$test_root = ( strpos(dirname(__FILE__), 'repository') === false ) ? '' : '../';


// Test Name
$test_name = 'ceo captcha test';

// Include Files
session_start();
require_once('../captcha/captcha.class.php');

// Configure Test
$debug = 1;


// Test Procedure
$Captcha = new CeoCaptcha($debug);
$Captcha->collect_garbage_after = 3;
$Captcha->maxlifetime = 60;
$Captcha->set_img_dir('../img_bin/');
$Captcha->make('test');
$Captcha->print_d('display captcha form', 'purple');
print $Captcha->display();
$Captcha->dump();


// Footer
$_txn = microtime();
$stx = number_format(((substr($_txn,0,9)) + (substr($_txn,-10)) - (substr($_tx0,0,9)) - (substr($_tx0,-10))),4); 
echo "<h6>test '$test_name' complete in $stx s</h6>";
?>
